import { createRouter, createWebHistory } from 'vue-router'
import type { RouteRecordRaw } from 'vue-router'
import Home from '@/views/Home.vue'

const routes: RouteRecordRaw[] = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/products',
    name: 'Products',
    component: () => import('@/views/products/Product.vue')
  },
  {
    path: '/products/category',
    name: 'ProductCategory',
    component: () => import('@/views/products/Category.vue')
  },
  {
    path: '/orders',
    name: 'Orders',
    component: () => import('@/views/orders/Order.vue')
  },
  {
    path: '/users',
    name: 'Users',
    component: () => import('@/views/users/User.vue')
  },
  {
    path: '/riders',
    name: 'Riders',
    component: () => import('@/views/riders/Rider.vue')
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/views/Login.vue')
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router 